#!/bin/bash

# A simple script to display wifi name
# 'ssid -i' = with icon, 'ssid' = text only
# Cheers!
# Addy

SSID_NAME=$(nmcli -a | grep "已连接" | awk '{ print $3 }')

if [[ "${SSID_NAME}" != "" ]]; then
	if  [[ $1 = "-i" ]]; then
    echo "󰀂  ${SSID_NAME}"
	else
    echo "${SSID_NAME}"
	fi
else
echo "Not Connected"
fi

exit
